import { reactive, toRefs, getCurrentInstance, computed, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import ComponentAsideNav from '@/components/ComponentAsideNav';
import Header from '@/components/Header';
export default {
    name:'component',
    components: { ComponentAsideNav, Header },
    props:{}, 
    emits:[],
    setup (props, context)
    {
        const router = useRouter();
        const { proxy } = getCurrentInstance();

        let routes = computed(() => 
        {
            let child = [];
            router.getRoutes().forEach((item) => 
            {
                if(item.name === 'component')
                {
                    child = item.children;
                }
            });
            return child;
        });

        let data = reactive({
        });

        let methods = {
           
        };

        onMounted(() => 
        {
        });

        return {
            routes,
            ...toRefs(data),
            ...methods
        };
    }
};